package com.xly.webclick.base;

import android.databinding.ViewDataBinding;

import com.xly.webclick.adapter.CommonBindingViewHolder;


/**
 * Created by Leo on 2018/7/5
 */
public abstract class BaseItemViewModel extends BaseViewModel {

    private CommonBindingViewHolder commonBindingViewHolder;
    private ViewDataBinding binding;

    private int position;

    public BaseItemViewModel(BaseActivity view) {
        super(view);
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public void setCommonBindingViewHolder(CommonBindingViewHolder commonBindingViewHolder) {
        this.commonBindingViewHolder = commonBindingViewHolder;
        this.binding = commonBindingViewHolder.getBinding();

    }

    public ViewDataBinding getBinding() {
        return binding;
    }

    public CommonBindingViewHolder getCommonBindingViewHolder() {
        return commonBindingViewHolder;
    }
}
